package util.tools.etc;

import java.text.DecimalFormat;

public class Misc {
    public static String round(double val) {
        DecimalFormat decimalFormat = new DecimalFormat();
        decimalFormat.setMaximumFractionDigits(7);
        return decimalFormat.format(val);
    }


    public static double getValue(String s) {
        try {
            return Double.parseDouble(s);
        } catch (Exception ex) {
            return -1;
        }
    }
}
